
const storage ={
	setStorage(key, val){
		try {
			mpvue.setStorageSync(key, val)
		} catch (e) {	
			console.log(e)
		}

	},
	getStorage(key){
		return mpvue.getStorageSync(key)
	},
	removeStorage(key){
		mpvue.removeStorage({key:key})
	}
}


export default {
	install: function(Vue, Option) {
		Object.defineProperty(Vue.prototype, "$storage", { value: storage });
	},
	storage:{
		setStorage(key, val){
			try {
				mpvue.setStorageSync(key, val)
			} catch (e) {	
				console.log(e)
			}

		},
		getStorage(key){
			return mpvue.getStorageSync(key)
		},
		removeStorage(key){
			mpvue.removeStorage({key:key})
		}
	}
};